{if !empty($randAdv)}
<div class="rich_media_extra" id="gdt_area">
    <div class="rich_tips with_line title_tips">
        <span class="tips">推广</span>
    </div>

    <div class="js_ad_link extra_link" data-aid="{$randAdv['id']}">
        {if $randAdv['type']==2}
        <a href="{$randAdv['link']}">
            <img class="appmsg_banner" src="{$randAdv['thumb']}" style="max-width:100%;height:100px; line-height:100px;">
        </a>
        {else}
        <div class="preview_group">
            <div class="preview_group_inner">
                <div class="preview_group_info append_btn">
                    <strong class="preview_group_title">{$randAdv['title']}</strong>
                    <div class="preview_group_desc">{$randAdv['title']}</div>
                    <img class="preview_group_avatar br_radius" src="{$randAdv['thumb']}" alt="{$randAdv['title']}">
                </div>
                <div class="preview_group_opr">
                    {if $randAdv['type']==1 }
                    <a id="js_view_profile" onclick="view_profile()" class="btn btn_inline btn_primary btn_line js_ad_btn" href="javascript:void(0);">
                        查看
                    </a>
                    {/if}
                    {if $randAdv['type']==0 }
                    <a id="js_add_contact" onclick="add_contact()" class="btn btn_inline btn_line  btn_primary js_ad_btn" href="javascript:void(0);">
                        关注
                    </a>
                    {/if}
                    <script type="text/javascript">
                        function view_profile(){
                            window.location.href='{$randAdv['link']}';
                        }
                        function add_contact(){
                            window.location.href='{$randAdv['link']}';
                        }

                    </script>
                </div>
            </div>
        </div>
        {/if}

    </div>
</div>
{/if}